package cn.db101.jcc.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class BannerTableDef extends TableDef {

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn URL = new QueryColumn(this, "url");

    /**
     * 排序，越小越靠前
     */
    public final QueryColumn SORT = new QueryColumn(this, "sort");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, URL, SORT, CREATE_TIME};

    public BannerTableDef() {
        super("", "t_banner");
    }

    private BannerTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public BannerTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new BannerTableDef("", "t_banner", alias));
    }

}
